Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Supervisor][fabric] Fix the error message for non-present fabric card during config reload on SUP #19778

Merged
merged 2 commits into from
Nov 13, 2024

Conversation

mlok-nokia
Copy link
Contributor

@mlok-nokia mlok-nokia commented Aug 2, 2024

Why I did it

After a config reload or a config load_minigraph we see the following error messages in the syslog for non existing fabric cards:

ixre-cpm-chassis19 ERR container: docker cmd: stop for syncd0 failed with 404 Client Error for http+docker://localhost/v1.43/containers/syncd0/json: Not Found ("No such container: syncd0")
ixre-cpm-chassis19 ERR container: docker cmd: stop for syncd1 failed with 404 Client Error for http+docker://localhost/v1.43/containers/syncd1/json: Not Found ("No such container: syncd1")

On Sup, for non-existing Fabric slot, its related swss and syncd containers have not been created yet although its related services have been started.

Work item tracking
  • Microsoft ADO (number only):

How I did it

Added checking to the docker_image_ctrl.j2 stop() method. This change adds code to check if related container exists, then call container stop. Otherwise, just log a message to indicate that "No such container". Fixes #19765

How to verify it

  1. execute "config reload" on SUP which contains empty Fabric slot.
  2. The following related error message should not be seen in syslog
ixre-cpm-chassis19 ERR container: docker cmd: stop for syncd0 failed with 404 Client Error for http+docker://localhost/v1.43/containers/syncd0/json: Not Found ("No such container: syncd0")
ixre-cpm-chassis19 ERR container: docker cmd: stop for syncd1 failed with 404 Client Error for http+docker://localhost/v1.43/containers/syncd1/json: Not Found ("No such container: syncd1")
  1. Instead, the following message should be shown for the related empty Fabric slot
2024 Sep 19 17:45:18.339106 ixre-cpm-chassis15 INFO swss.sh[2024819]: container stop swss0 -- No such container: swss0
2024 Sep 19 17:45:20.633519 ixre-cpm-chassis15 INFO syncd.sh[2025664]: container stop syncd0 -- No such container: syncd0

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211
  • 202305
  • 202405

Tested branch (Please provide the tested image version)

  • master
  • 2022405

Description for the changelog

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

@mlok-nokia
Copy link
Contributor Author

@abdosi I have changed the code to be more generic to check if docker doesn't exist, log a message. Please review it again.

@mlok-nokia
Copy link
Contributor Author

@abdosi HI Abhishek, Please help to review this PR. Thanks.

@rlhui
Copy link
Contributor

rlhui commented Nov 6, 2024

@abdosi reminder to help re-review, thanks.

@abdosi
Copy link
Contributor

abdosi commented Nov 13, 2024

@yejianquan

@rlhui rlhui merged commit 95e2b3b into sonic-net:master Nov 13, 2024
23 checks passed
mssonicbld pushed a commit to mssonicbld/sonic-buildimage that referenced this pull request Nov 13, 2024
…d during config reload on SUP (sonic-net#19778)

* [Supervisor][fabric] Fix the error message for non-present fabric card during config reload on SUP

Added checking to the docker_image_ctrl.j2 stop() method. This change adds code to check if related container exists, then call container stop. Otherwise, just log a message to indicate that "No such container". Fixes sonic-net#19765

---------

Signed-off-by: mlok <marty.lok@nokia.com>
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202405: #20778

mssonicbld pushed a commit that referenced this pull request Nov 13, 2024
…d during config reload on SUP (#19778)

* [Supervisor][fabric] Fix the error message for non-present fabric card during config reload on SUP

Added checking to the docker_image_ctrl.j2 stop() method. This change adds code to check if related container exists, then call container stop. Otherwise, just log a message to indicate that "No such container". Fixes #19765

---------

Signed-off-by: mlok <marty.lok@nokia.com>
aidan-gallagher pushed a commit to aidan-gallagher/sonic-buildimage that referenced this pull request Nov 16, 2024
…d during config reload on SUP (sonic-net#19778)

* [Supervisor][fabric] Fix the error message for non-present fabric card during config reload on SUP

Added checking to the docker_image_ctrl.j2 stop() method. This change adds code to check if related container exists, then call container stop. Otherwise, just log a message to indicate that "No such container". Fixes sonic-net#19765

---------

Signed-off-by: mlok <marty.lok@nokia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

No such container error message for non existing fabric cards with config reload/load_minigrph
5 participants